package cn.com.ethos.search.index;


import org.apache.lucene.document.Document;

public interface IDocumentStream {
	
	/**
	 * get current document from stream
	 * @return current document 
	 */
	Document next() throws Exception;
	
	/**
	 * check if there is end of stream
	 * @return
	 */
	boolean hasNext() throws Exception;
	
	/**
	 * close current stream
	 */
	void close();
	
	/**
	 * open document stream
	 * @throws Exception
	 */
	void open() throws Exception;
}
